home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Dogs / Multimedia Dogs v2.0.iso / mac / Multimedia Dogs 2.0 / MIAW.DXR / 00008.ls < prev    next >
Encoding:
Text File  |  1995-10-09  |  580 b   |  24 lines

  1. on exitFrame
  2.   go(the frame)
  3. end
  4.  
  5. on keyDown
  6.   set theCastnum to the number of cast "SelectionList"
  7.   set theText to the text of cast theCastnum
  8.   set theIndex to 0
  9.   set theOffset to 7
  10.   repeat with i = 1 to the number of lines in theText
  11.     set theChar to char 1 of line i of theText
  12.     if theChar = the key then
  13.       set theIndex to i
  14.       exit repeat
  15.     end if
  16.   end repeat
  17.   if theIndex <> 0 then
  18.     set thePoint to min(theIndex + theOffset, the number of lines in field theCastnum)
  19.     put EMPTY before line thePoint of field theCastnum
  20.   else
  21.     beep()
  22.   end if
  23. end
  24.